package cn.stylefeng.guns.sys.modular.system.service;

import cn.stylefeng.guns.base.pojo.page.LayuiPageFactory;
import cn.stylefeng.guns.sys.modular.system.entity.BtyBorrower;
import cn.stylefeng.guns.sys.modular.system.mapper.BtyBorrowerMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 借贷款用户表 服务实现类
 * </p>
 * @author liuy
 * @since
 */
@Service
public class BtyBorrowerService extends ServiceImpl<BtyBorrowerMapper, BtyBorrower> {
    /**
     * 获取借贷款用户列表
     */
    public Page<Map<String, Object>> list(String condition,String tel) {
        Page page = LayuiPageFactory.defaultPage();
        return this.baseMapper.list(page, condition,tel);
    }
    /**
     * 获取已借贷款人数
     */
    public List<BtyBorrower> borrowed(){
        return baseMapper.borrowed();
    }
    /**
     * 获取未借贷款人数
     */
    public List<BtyBorrower> notBorrowed(){
        return baseMapper.notBorrowed();
    }

    /**
     * 获取还款信息
     * @return
     */
    public List<BtyBorrower> borrowerList() {
        return baseMapper.borrowerList();
    }
}
